﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Enter.Entity;
using System.Data;
using Enter.Config;

namespace Enter.Services.Mail
{
    /// <summary>
    /// 商品展示
    /// </summary>
    public partial interface IMail
    {

        /// <summary>
        /// 商品编码
        /// </summary>
        /// <returns></returns>
        string GetProductNo();
       /// <summary>
        /// 添加商品
        /// </summary>
        /// <param name="Entity"></param>
        /// <param name="itemList">库存</param>
        /// <param name="imgList">图片</param>
        /// <param name="propertyList">属性</param>
        /// <returns></returns>
        bool AddProduct(T101_GoodsEntity Entity, List<T103_Goods_ItemEntity> itemList, List<T104_GoodImgesEntity> imgList, List<T113_Good_PropertyEntity> propertyList);
        /// <summary>
        /// 获取商品详情
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        T101_GoodsEntity GetProduct(int ID);

        #region 商品列表
        #region 热评
        /// <summary>
        /// 根据地区获取热评商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCommentGoods(int count);
        
        /// <summary>
        /// 某店铺热评商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCommentGoodsbyShop(string shopNo, int count);
       
        /// <summary>
        /// 获取某类型热评商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCommentGoodsbyCID(string areaNO, string classNO, int count);
        
        /// <summary>
        /// 根据店铺、类型获取热评商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCommentGoodsbyCID(int shopID, string classNO, int count);
        
        /// <summary>
        /// 根据地区、父类型获取热评商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCommentGoodsbyFClass(string areaNO, string classNO, int count);
       
        /// <summary>
        /// 根据店铺、父类型获取热评商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCommentGoodsbyFClass(int shopID, string classNO, int count);
        
        #endregion

        #region  热卖

        /// <summary>
        /// 根据地区获取热卖商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHotGoods(string areaNO, int count);
       
        /// <summary>
        /// 某店铺热卖商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHotGoodsbyShop(string shopNo, int count);
    
        /// <summary>
        /// 获取某类型热卖商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHotGoodsbyCID(string areaNO, string classNO, int count);
        
        /// <summary>
        /// 根据店铺、类型获取热卖商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHotGoodsbyCID(int shopID, string classNO, int count);
       
        /// <summary>
        /// 根据地区、父类型获取热卖商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHotGoodsbyFClass(string areaNO, string classNO, int count);
     
        /// <summary>
        /// 根据店铺、父类型获取热卖商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHotGoodsbyFClass(int shopID, string classNO, int count);
        

        #endregion


        #region 热门收藏
        /// <summary>
        /// 根据地区获取热门收藏商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCollectGoods(string areaNO, int count);
       
        /// <summary>
        /// 某店铺热门收藏商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCollectGoodsbyShop(string shopNo, int count);
      
        /// <summary>
        /// 获取某类型热门收藏商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCollectGoodsbyCID(string areaNO, string classNO, int count);
        
        /// <summary>
        /// 根据店铺、类型获取热门收藏商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCollectGoodsbyCID(int shopID, string classNO, int count);
       
        /// <summary>
        /// 根据地区、父类型获取热门收藏商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCollectGoodsbyFClass(string areaNO, string classNO, int count);
      
        /// <summary>
        /// 根据店铺、父类型获取热门收藏商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetCollectGoodsbyFClass(int shopID, string classNO, int count);
        
        #endregion

        #region  热门浏览

        /// <summary>
        /// 根据地区获取热门浏览商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHitGoods(string areaNO, int count);
       
        /// <summary>
        /// 某店铺热门浏览商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHitGoodsbyShop(string shopNo, int count);
      
        /// <summary>
        /// 获取某类型热门浏览商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHitGoodsbyCID(string areaNO, string classNO, int count);
       
        /// <summary>
        /// 根据店铺、类型获取热门浏览商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHitGoodsbyCID(int shopID, string classNO, int count);
       
        /// <summary>
        /// 根据地区、父类型获取热门浏览商品
        /// </summary>
        /// <param name="areaNO">地区</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHitGoodsbyFClass(string areaNO, string classNO, int count);
      
        /// <summary>
        /// 根据店铺、父类型获取热门浏览商品
        /// </summary>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">父类型</param>
        /// <param name="count">数量</param>
        /// <returns>T101_GoodsEntity结果集</returns>
        List<T101_GoodsEntity> GetHitGoodsbyFClass(int shopID, string classNO, int count);
        

        #endregion

        #region 分页数据集

        /// <summary>
        /// 根据地区获取商品
        /// </summary>
        /// <param name="entity">排序实体</param>
        /// <param name="areaNo">地区</param>
        /// <param name="orderCol">排序字段</param>
        /// <param name="orderType">排序方式</param>
        /// <param name="totalPages">总页数</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
        DataTable GetGoods(string areaNo, int pageSize, int currentPageIndex, EnumGoodOrder orderCol, EnumOrderType orderType, out int totalPages, out int totalCount);
       
        /// <summary>
        /// 根据地区、商品类型获取商品
        /// </summary>
        /// <param name="entity">排序实体</param>
        /// <param name="areaNo">地区</param>
        /// <param name="classID">商品类型</param>
        /// <param name="orderCol">排序字段</param>
        /// <param name="orderType">排序方式</param>
        /// <param name="totalPages">总页数</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
        DataTable GetGoodsbyCID(string areaNo, string classNO, string propList, string SerachKey, decimal sprice, decimal eprice, int pageSize, int currentPageIndex, EnumGoodOrder orderCol, EnumOrderType orderType, out int totalPages, out int totalCount);
       
        /// <summary>
        /// 根据地区、商品类型获取商品
        /// </summary>
        /// <param name="entity">排序实体</param>
        /// <param name="areaNo">地区</param>
        /// <param name="parentClassID">商品父类型</param>
        /// <param name="orderCol">排序字段</param>
        /// <param name="orderType">排序方式</param>
        /// <param name="totalPages">总页数</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
         DataTable GetGoodsbyPID(string areaNo, int parentClassID, int pageSize, int currentPageIndex, EnumGoodOrder orderCol, EnumOrderType orderType, out int totalPages, out int totalCount);
      
       
        /// <summary>
        /// 某店铺某类型商品
        /// </summary>
        /// <param name="entity">排序实体</param>
        /// <param name="shopID">店铺</param>
        /// <param name="classID">商品类型</param>
        /// <param name="orderCol">排序字段</param>
        /// <param name="orderType">排序方式</param>
        /// <param name="totalPages">总页数</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
         DataTable GetGoodsbyCID(int shopID, string classNO, int pageSize, int currentPageIndex, EnumGoodOrder orderCol, EnumOrderType orderType, out int totalPages, out int totalCount);
        
        /// <summary>
        /// 某店铺某父类型商品
        /// </summary>
        /// <param name="entity">排序实体</param>
        /// <param name="shopID">店铺</param>
        /// <param name="parentClassID">商品父类型</param>
        /// <param name="orderCol">排序字段</param>
        /// <param name="orderType">排序方式</param>
        /// <param name="totalPages">总页数</param>
        /// <param name="totalCount">总条数</param>
        /// <returns></returns>
        DataTable GetGoodsbyPID(int shopID, int parentClassID, int pageSize, int currentPageIndex, EnumGoodOrder orderCol, EnumOrderType orderType, out int totalPages, out int totalCount);
        #endregion
        #endregion

        /// <summary>
        /// 添加商品浏览记录
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool AddGoodCheakInfo(T108_GoodCheakInfoEntity entity);
        #region 推荐商品
        /// <summary>
        /// 根据商品ID，获取浏览过这个商品的人浏览过的其他商品
        /// </summary>
        /// <param name="gID"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        DataTable GetRecommendGoods(int gID, int count);
       
        /// <summary>
        /// 根据商品ID，获取浏览过这个商品的人浏览过的其他商品
        /// </summary>
        /// <param name="gID"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        DataTable GetRecommendGoods(int gID, int shopID, int count);
      
        #endregion

        #region 商品库存
        /// <summary>
        /// 获取库存
        /// </summary>
        /// <param name="gNo"></param>
        /// <param name="colorNO"></param>
        /// <param name="sizeNO"></param>
        /// <returns></returns>
        T103_Goods_ItemEntity GetProductItem(string gNo, string colorNO, string sizeNO);
        /// <summary>
        /// 子商品列表
        /// </summary>
        /// <param name="gNo"></param>
        /// <returns></returns>
         List<T103_Goods_ItemEntity> getProductColorListByGNO(string gNo);
         List<T103_Goods_ItemEntity> getProductSizeListByGNO(string gNo);
        /// <summary>
        /// 库存详情
        /// </summary>
        /// <param name="itemID"></param>
        /// <returns></returns>
         T103_Goods_ItemEntity getProductItemInfo(int itemID);
        #endregion

        #region 商品图片
        /// <summary>
        /// 商品详情图片
        /// </summary>
        /// <param name="gNo"></param>
        /// <returns></returns>
         List<T104_GoodImgesEntity> GetProductInfoImg(string gNo);
        
        #endregion

        #region 商品属性值
        /// <summary>
        /// 获取商品属性值
        /// </summary>
        /// <param name="gNo"></param>
        /// <returns></returns>
         DataTable GetProdoudProp(string gNo);
         /// <summary>
        /// 获取商品品牌
        /// </summary>
        /// <param name="gNo"></param>
        /// <returns></returns>
         DataTable GetProdoudBrand(string gNo);
        #endregion
    }
}
